﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using BUS;

namespace CustomerManager
{
    public partial class ucDebt_Personal : UserControl
    {
        public ucDebt_Personal()
        {
            InitializeComponent();
        }
        public string tenkh="";
        public ucDebt_Personal(FrmMain.ExeAction act)
        {
            InitializeComponent();
            if (act == FrmMain.ExeAction.Add)
            {
                //btnSua.Visible = false;
            }
            else if(act == FrmMain.ExeAction.View)
            {
               // btnLuu.Visible = false;
            }
        }

        DataTable dtKhoanVay;
        int loaikh;

        public void LoadKhoanVay(int kh, string makh)
        {
            loaikh = kh;
            dtKhoanVay = DebtBUS.LayKhoanVayTheoMaKH(makh, kh);
            dgvkhcanhan.DataSource = dtKhoanVay;
        }

        private void ucDebt_Personal_Load(object sender, EventArgs e)
        {
            txtTenKH.Visible = true;
            txtTenKH.Text = tenkh;
        }

        private void btnTroLai_Click(object sender, EventArgs e)
        {
            this.Dispose();
        }

        private void btnSua_Click(object sender, EventArgs e)
        {

        }

      
           
  



    }
}
